Skip to content

Comments

implemented elastic search setup#128

Merged
llinsss merged 8 commits intoDogStark:mainfrom
chiscookeke11:issue-#91
Feb 23, 2026
Merged

implemented elastic search setup#128
llinsss merged 8 commits intoDogStark:mainfrom
chiscookeke11:issue-#91

Conversation

@chiscookeke11
Copy link
Contributor

@chiscookeke11 chiscookeke11 commented Feb 22, 2026

Description

This PR integrates Elasticsearch into the PetChain platform to provide high-performance, full-text search capabilities across pets, vets, and medical records. It moves search logic from basic database queries to a dedicated search engine, enabling advanced features like relevance scoring, geolocation-aware results, and real-time autocomplete.

Related Issues

closes #91

Changes Made - [ ]

  • Elasticsearch Client Initialization: Created a singleton client in lib/elasticsearch.ts for efficient connection management.
  • Unified Search API: Implemented POST /api/v1/search supporting:
  • Relevance Scoring: Multi-match queries with field boosting (e.g., name^3).
  • Geolocation: geo_distance filtering based on user coordinates.
  • Faceted Search: Aggregations for breed, specialty, and status.

Screenshots (if applicable)

Checklist

  • My code follows the project's coding style.
  • I have tested these changes locally.
  • Documentation has been updated where necessary.

Copy link
Collaborator

@llinsss llinsss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove package-lock.json

@chiscookeke11
Copy link
Contributor Author

remove package-lock.json

Done

@llinsss
Copy link
Collaborator

llinsss commented Feb 23, 2026

you still conflicts to resolve

@chiscookeke11 chiscookeke11 marked this pull request as draft February 23, 2026 08:17
@chiscookeke11 chiscookeke11 marked this pull request as ready for review February 23, 2026 08:20
@chiscookeke11
Copy link
Contributor Author

you still conflicts to resolve

Done

@llinsss llinsss merged commit 9446976 into DogStark:main Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Elasticsearch Integration

2 participants